package cn.zcib.film.mapper;

import cn.zcib.film.bean.User;
import cn.zcib.film.bean.vo.UserVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserMapper {
    List<User> getUsers(UserVO userVO);

    int updateUserById(User user);

    int resetPasswordById(Integer uId);

    @Delete("delete from tbl_user where u_id = #{uId}")
    int deleteUserById(Integer uId);

    //用户统计
    @Select("select count(*) from tbl_user")
    int countUsers();
    //用户性别统计
   List<Map<String,Integer>> userGenderPer();
}
